package vip.ifmm.lehouse.common.enums.status;

import vip.ifmm.lehouse.common.enums.Statable;

/**
 * @author Red
 * email: 1318944013@qq.com
 * date: 2019/6/21 16:12
 */
public enum  CommentStatus implements Statable {

    COMMENT_IS_NOT_RIGHT(-1, "评论不合法"),
    COMMENT_FAILURE(-1, "评论失败"),
    COMMENT_IS_NOT_EXISTED(-1, "评论不存在"),
    COMMENT_SUCCESS(0, "评论成功"),
    COMMENT_IS_OK(0, "合法评论"),
    STAR_SUCCESS(0, "点赞成功"),
    STAR_FAILURE(-1, "点赞失败"),
    COMMNET_LIST_SUCCESS(0, "获取评论列表成功"),
    SESSION_NOT_EXISTED(-1, "用户session不存在"),
    SERVICE_IS_NOT_AVAILABLE(-1, "服务不可用"),
    COMMENT_DELETE_FAILURE(-1, "删除评论失败"),
    COMMENT_DELETE_SUCCESS(0, "删除评论成功"),
    REPEAT_COMMENT(-1, "重复评论"),
    ;

    private String msg;

    private int code;

    CommentStatus(int code, String msg) {
        this.msg = msg;
        this.code = code;
    }

    @Override
    public int getCode() {
        return code;
    }

    @Override
    public String getMsg() {
        return msg;
    }
}
